//
//  HJConversationManagerProtocol.h
//  KaiChat
//
//  Created by lx on 2023/10/20.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@class HJChatSessionModel;

@protocol HJConversationManagerProtocol <NSObject>


@optional

@property (nonatomic, assign, readonly) NSInteger allMessageUnReadCount;

- (void)addConversation:(HJChatSessionModel *)sessionModel;
- (void)addConversation:(HJChatSessionModel *)sessionModel addNot:(BOOL)addNot;
- (void)deleteConversationWithSessionId:(NSString *)sessionId completion:(void (^__nullable)(NSError *error))completion;

- (void)allConversationListCompletion:(void (^__nullable)(NSArray *list))completion;

- (void)getConversationBySessionId:(NSString *)sessionId completion:(void (^__nullable)(HJChatSessionModel *sessionModel))completion;
- (HJChatSessionModel *)getConversationBySessionId:(NSString *)sessionId;
- (HJChatSessionModel *)getSimpleConversationBySessionId:(NSString *)sessionId;

- (BOOL)isNewConversationBySessionId:(NSString*)sessionId;
- (void)updateOfficialConversation;

- (void)getUnreadConversationMessageIds:(NSString *)sessionId completion:(void (^__nullable)(NSArray *list))completion;
- (void)updateBadge;
- (void)topWithSessionId:(NSString *)sessionId isTop:(BOOL)isTop type:(HJChatType)type complete:(void (^__nullable)(NSError *error))complete;
- (void)muteWithSessionId:(NSString *)sessionId isMute:(BOOL)isMute type:(HJChatType)type complete:(void (^__nullable)(NSError *error))complete;
- (void)loadConversatioInfoWithSessionId:(NSString *)sessionId type:(HJChatType)type completion:(void (^__nullable)(HJChatSessionModel *sessionModel))completion;
- (void)readMessageWithSessionId:(nullable NSString *)sessionId msgIds:(nullable NSArray *)msgIds  completion:(void (^ _Nullable )( NSError * _Nullable error))completion;
- (void)readOfficialMessageWithSessionId:(nullable NSString *)sessionId;
 
@end

NS_ASSUME_NONNULL_END
